// pages/user/user.js
Page({
  data: {
    userInfo:{},
  },
  onLoad: function () {
    const userInfo = wx.getStorageSync("userInfo") || {};
    this.setData({userInfo})
  },
  /* 登录获取用户信息 */
  getUserInfo(e){
    const {userInfo} = e.detail;
    this.setData({userInfo})
    wx.setStorageSync("userInfo", userInfo);
  }
})

